package com.financing.wap.dao.impl;


import java.sql.SQLException;
import java.util.List;
import java.util.Map;
import org.springframework.stereotype.Repository;
import com.financing.wap.dto.PrUserAuthDTO;
import com.financing.wap.dao.IPrUserAuthDao;
import com.financing.wap.common.SqlName;
/**
 * pr_user_auth  
 * 用户认证 数据访问层实现类
 * @author huqiyun
 *
 */
 
@Repository("prUserAuthDao")
public class PrUserAuthDaoImpl extends BaseDaoImpl<PrUserAuthDTO, Integer> implements IPrUserAuthDao {


	@Override
	public int insert(PrUserAuthDTO prUserAuth) throws SQLException {
		return (Integer) this.sqlMapClientTemplate.insert(SqlName.PrUserAuthSql.insert, prUserAuth);
	}

	@Override
	public void update(PrUserAuthDTO prUserAuth) throws SQLException {
		this.sqlMapClientTemplate.update(SqlName.PrUserAuthSql.update, prUserAuth);
	}

	@Override
	public void updateForce(PrUserAuthDTO prUserAuth) throws SQLException {
		this.sqlMapClientTemplate.update(SqlName.PrUserAuthSql.updateForce, prUserAuth);
	}

	@Override
	public void delete(Integer id) throws SQLException {
		this.sqlMapClientTemplate.delete(SqlName.PrUserAuthSql.delete,id);
	}
	
	@SuppressWarnings("unchecked")	
	@Override
	public List<PrUserAuthDTO> queryList(PrUserAuthDTO prUserAuth) throws SQLException {
		return this.sqlMapClientTemplate.queryForList(SqlName.PrUserAuthSql.queryList, prUserAuth);
	}

	@Override
	public int queryListCount(PrUserAuthDTO prUserAuth) throws SQLException {
		return (Integer) this.sqlMapClientTemplate.queryForObject(SqlName.PrUserAuthSql.queryListCount, prUserAuth);
	}

	@Override
	public PrUserAuthDTO loadById(Integer id) throws SQLException {
		return  (PrUserAuthDTO)this.getSqlMapClientTemplate().queryForObject(SqlName.PrUserAuthSql.loadById,id);
	}

	@Override
	public Class<PrUserAuthDTO> getEntityClass() {
		return PrUserAuthDTO.class;
	}
 	
}
